package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractTenantEntity;

/** @author Hibernate CodeGenerator */

public class UserTable extends AbstractTenantEntity implements Serializable {

    /** persistent field */
    private String firstName;

    /** persistent field */
    private String lastName;

    /** persistent field */
    private String emailId;

    /** nullable persistent field */
    private Date birthDate;

    /** nullable persistent field */
    private String gender;

    /** persistent field */
    private String pwd;

    /** nullable persistent field */
    private Date lastLggedIn;

    /** persistent field */
    private Set users;

    /** persistent field */
    private Set auctions;

    /** persistent field */
    private Set bidWorkflowAudits;

    /** persistent field */
    private Set transactions;

    /** persistent field */
    private Set itemWorkflowAudits;

    /** persistent field */
    private Set userAddresses;

    /** persistent field */
    private Set bids;

    /** persistent field */
    private Set orders;

    /** persistent field */
    private Set userRoles;

    /** persistent field */
    private Set inventories;

    /** persistent field */
    private Set companies;

    /** persistent field */
    private Set items;

    /** persistent field */
    private Set brands;

    /** full constructor */
    public UserTable(String username, String firstName, String lastName, String emailId, Date birthDate, String gender, String pwd, Date lastLggedIn, Date updateTime, Date createTime, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Company company, com.ces.knacky.model.UserTable user, Set users, Set auctions, Set bidWorkflowAudits, Set transactions, Set itemWorkflowAudits, Set userAddresses, Set bids, Set orders, Set userRoles, Set inventories, Set companies, Set items, Set brands) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.emailId = emailId;
        this.birthDate = birthDate;
        this.gender = gender;
        this.pwd = pwd;
        this.lastLggedIn = lastLggedIn;
        this.updateTime = updateTime;
        this.createTime = createTime;
        this.flag = flag;
        this.company = company;
        this.user = user;
        this.users = users;
        this.auctions = auctions;
        this.bidWorkflowAudits = bidWorkflowAudits;
        this.transactions = transactions;
        this.itemWorkflowAudits = itemWorkflowAudits;
        this.userAddresses = userAddresses;
        this.bids = bids;
        this.orders = orders;
        this.userRoles = userRoles;
        this.inventories = inventories;
        this.companies = companies;
        this.items = items;
        this.brands = brands;
    }

    /** default constructor */
    public UserTable() {
    }

    /** minimal constructor */
    public UserTable(String username, String firstName, String lastName, String emailId, String pwd, com.ces.knacky.model.Flag flag, com.ces.knacky.model.Company company, com.ces.knacky.model.UserTable user, Set users, Set auctions, Set bidWorkflowAudits, Set transactions, Set itemWorkflowAudits, Set userAddresses, Set bids, Set orders, Set userRoles, Set inventories, Set companies, Set items, Set brands) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.emailId = emailId;
        this.pwd = pwd;
        this.flag = flag;
        this.company = company;
        this.user = user;
        this.users = users;
        this.auctions = auctions;
        this.bidWorkflowAudits = bidWorkflowAudits;
        this.transactions = transactions;
        this.itemWorkflowAudits = itemWorkflowAudits;
        this.userAddresses = userAddresses;
        this.bids = bids;
        this.orders = orders;
        this.userRoles = userRoles;
        this.inventories = inventories;
        this.companies = companies;
        this.items = items;
        this.brands = brands;
    }

    public String getFirstName() {
        return this.firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return this.lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getEmailId() {
        return this.emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public Date getBirthDate() {
        return this.birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public String getGender() {
        return this.gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPwd() {
        return this.pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public Date getLastLggedIn() {
        return this.lastLggedIn;
    }

    public void setLastLggedIn(Date lastLggedIn) {
        this.lastLggedIn = lastLggedIn;
    }

    @XmlTransient
    public Set getUsers() {
        return this.users;
    }

    public void setUsers(Set users) {
        this.users = users;
    }

    @XmlTransient
    public Set getAuctions() {
        return this.auctions;
    }

    public void setAuctions(Set auctions) {
        this.auctions = auctions;
    }

    @XmlTransient
    public Set getBidWorkflowAudits() {
        return this.bidWorkflowAudits;
    }

    public void setBidWorkflowAudits(Set bidWorkflowAudits) {
        this.bidWorkflowAudits = bidWorkflowAudits;
    }

    @XmlTransient
    public Set getTransactions() {
        return this.transactions;
    }

    public void setTransactions(Set transactions) {
        this.transactions = transactions;
    }

    @XmlTransient
    public Set getItemWorkflowAudits() {
        return this.itemWorkflowAudits;
    }

    
    public void setItemWorkflowAudits(Set itemWorkflowAudits) {
        this.itemWorkflowAudits = itemWorkflowAudits;
    }

    @XmlTransient
    public Set getUserAddresses() {
        return this.userAddresses;
    }

    public void setUserAddresses(Set userAddresses) {
        this.userAddresses = userAddresses;
    }

    @XmlTransient
    public Set getBids() {
        return this.bids;
    }

    public void setBids(Set bids) {
        this.bids = bids;
    }

    @XmlTransient
    public Set getOrders() {
        return this.orders;
    }

    public void setOrders(Set orders) {
        this.orders = orders;
    }

    @XmlTransient
    public Set getUserRoles() {
        return this.userRoles;
    }

    public void setUserRoles(Set userRoles) {
        this.userRoles = userRoles;
    }

    @XmlTransient
    public Set getInventories() {
        return this.inventories;
    }

    public void setInventories(Set inventories) {
        this.inventories = inventories;
    }

    @XmlTransient
    public Set getCompanies() {
        return this.companies;
    }

    public void setCompanies(Set companies) {
        this.companies = companies;
    }

    @XmlTransient
    public Set getItems() {
        return this.items;
    }

    public void setItems(Set items) {
        this.items = items;
    }

    @XmlTransient
    public Set getBrands() {
        return this.brands;
    }

    public void setBrands(Set brands) {
        this.brands = brands;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof UserTable) ) return false;
        UserTable castOther = (UserTable) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
